The present invention relates to the field of digital computer systems, and more specifically, to a method for joining a set of tables on a join attribute using a limited amount of memory.
Various techniques are used by databases to perform joins of tables including hash joins. A hash join algorithm builds a hash table for one of the tables in the join relation and probes the hash table for each record of the other table in the join relation. For performance reasons it is preferable to store the hash tables of the hash-join process in memory rather than on persistent storage e.g., disk. However, the memory is limited in size compared to the persistent storages. This may cause the hash-join process to run out of memory, thereby requiring the structures to be stored on disk. This causes the performance of the queries based on the hash join process to be degraded.